//
//  ZZIAPCodeHander.m
//  zz-IAPHelper
//
//  Created by ZengLiZhi on 2024/4/3.
//

#import "ZZIAPHander.h"

@implementation ZZIAPHander

- (instancetype)init
{
    self = [super init];
    if (self) {
        _tip_success = @"支付成功";
        _tip_failed = @"支付失败";
        _tip_cancel = @"用户支付取消";
        _tip_notAllow = @"暂时无法内购";
    }
    return self;
}

- (void)handleCode:(ZZIAPRequestCode)code{
    NSString *tips = _tip_success;
    switch (code) {
        case ZZIAPRequestCode_Success:
            tips = _tip_success;
            break;
        case ZZIAPRequestCode_Failed:
            tips = _tip_failed;
            break;
        case ZZIAPRequestCode_Cancel:
            tips = _tip_cancel;
            break;
        case ZZIAPRequestCode_NotAllow:
            tips = _tip_notAllow;
            break;
            
        default:
            break;
    }
    //弹窗
}

//发送交易凭证to后端
- (void)sendReceiptToServerWithPayType:(NSString *)type
                             isRestore:(BOOL)isRestore
                               orderId:(NSString *)orderId
                            receiptStr:(NSString *)receiptStr
                 transactionIdentifier:(NSString *)transactionIdentifier
                            completion:(ZZIAPsendReceiptCompletion)completion{
    
}
@end
